package cn.hr;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement()//开启事务管理
@MapperScan("cn.hr.dao.mapper")
//停用springsecurity,需到SecurityConfig配置类注释@EnableWebSecurity
//@EnableAutoConfiguration(exclude = {SecurityAutoConfiguration.class})
public class HrSystemApplication {

    public static void main(String[] args) {
        SpringApplication.run(HrSystemApplication.class, args);
    }

    /**
     * 如果要发布到自己的Tomcat中的时候，需要继承SpringBootServletInitializer类，并且增加如下的configure方法。
     * 如果不发布到自己的Tomcat中的时候，就无需上述的步骤
     */
    /*protected SpringApplicationBuilder configure(
            SpringApplicationBuilder application) {
        return application.sources(HrSystemApplication.class);
    }*/
}
